// 47. 封装个人信息页请求
import { http } from '@/utils/http'
import type { ProfileDetail, ProfileParams } from '@/types/member' // 47.8 | 49.3

/**
 * 47.1 获取个人信息
 */
export const getMemberProfile = () => {
  return http<ProfileDetail>({
    method: 'GET',
    url: '/member/profile',
  })
}

/**
 * 49.1 修改个人信息
 */
export const putMemberProfile = (data) => {
  return http<ProfileParams>({
    method: 'PUT',
    url: '/member/profile',
    data,
  })
}
